//
//  WeiboError.m
//  YouHui
//
//  Created by  on 11-12-23.
//  Copyright (c) 2011年 netease. All rights reserved.
//

#import "ShareError.h"

@implementation ShareError

+(id)errorWithCode:(NSUInteger)code erorDesc:(NSString*)desc {
    return [[[ShareError alloc] initWithCode:code erorDesc:desc] autorelease];
}

-(id)initWithCode:(NSUInteger)code erorDesc:(NSString*)desc {
    if (self =[super initWithDomain:kShareErrorDomain code:code userInfo:nil]) {
        _errorDesc =[desc copy];
    }
    return self;
}

-(void)dealloc {
    [_errorDesc release];
    [super dealloc];
}
- (NSString *)localizedDescription {
    return _errorDesc;
}

@end